package com.example.pets.model.entities;


import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;


import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "pets")
public class Pet {

    @PrimaryKey(autoGenerate = true)
    private int pid; // 宠物的唯一文档 ID

    private String pname; // 宠物名称

    private long owner; // 宠物主人文档的引用

    private String breed; // 宠物品种

    private Boolean gender; // 宠物性别 (使用 Boolean 包装类以允许 null 值)

    private String birth; // 宠物出生日期/时间

    private String imageUrl; // 宠物图片的 URL

    private String createTime;

    // Getters and Setters
    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public long getOwner() {
        return owner;
    }

    public void setOwner(long owner) {
        this.owner = owner;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public Boolean getGender() {
        return gender;
    }

    public void setGender(Boolean gender) {
        this.gender = gender;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Ignore
    public Pet() {
    }

    public Pet(int pid, String pname, long owner, String breed, Boolean gender, String birth, String imageUrl, String createTime) {
        this.pid = pid;
        this.pname = pname;
        this.owner = owner;
        this.breed = breed;
        this.gender = gender;
        this.birth = birth;
        this.imageUrl = imageUrl;
        this.createTime = createTime;
    }
}
